<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
<h1>JavaScript Example 17</h1>
<br>
null and undefined.
<br>
<hr>
<br>

<!-- SCRIPT STARTS HERE -->

<script type="text/javascript">
	function log(x) {
		document.writeln("The variable value v is " + x + ", ");
		document.writeln("The variable type is " + typeof(x) + "<br>");
	}
	
	// the variable v is not yet declared
	log(v);

	// now it is declared but not yet initialized 
	var v;
	log(v);

	// now it is declared and initialized
	v = 1;
	log(v);

	// now we set the value to null
	v = null;
	log(v);
	
</script>


<!-- SCRIPT ENDS HERE -->

</body>
</html>
